package com.niu.crm.service;

import java.math.BigDecimal;
import java.util.List;

import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import com.niu.crm.form.StudentExportForm;
import com.niu.crm.form.StudentSearchForm;
import com.niu.crm.model.Student;
import com.niu.crm.model.User;

public interface StudentService {
	
	String getUniqueFld();
	
	Student load(Long id);
	
	int insert(User user, Student student);
        
    int update(User user, Student student);
    int updateScore(Long stuId, Integer examNo, BigDecimal score);
    
    void delete(Long id);
    
    List<Student> queryStudent(StudentSearchForm form, Pageable pager);
    
    int countStudent(StudentSearchForm form);
    
    /**
     * form.expSimple :true  时 只导出 编号，姓名， 及空列(成绩), 用于成绩导入
     * @param form
     * @param simple
     * @return
     */
    Workbook exportStudents(StudentExportForm form, Pageable pager);
    
    
    Integer importScore(User user, MultipartFile file) throws java.io.IOException;
    
    Integer importStudents(User user, MultipartFile file) throws java.io.IOException;
    
}
